<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<script type="text/javascript">
	$(document).ready(function() {
		$(".resetPsw").click(function() {
			$.getJSON("com/userAction!changePsw.jspa",{userId:$(this).attr("alt")}, function(json) {
				if (json.state) {
					alert("密码修改成功"+json.state);
				} else {
					alert("密码修改失败"+json.state);
				}
			});
		});
	});

	
</script>
<table class="table table-condensed">
	<thead>
		<tr>
			<th width="120px">用户名</th>
			<th width="120px">姓名</th>
			<th width="120px">角色</th>
			<th width="120px">导游领队信息</th>
			<th width="120px">重置密码</th>
		</tr>
	</thead>
	<s:iterator value="userList">
		<tr>
			<td><s:property value="username" />
			</td>
			<td><s:property value="name" />
			</td>
			<td><s:if test="role==7">总经理</s:if> <s:elseif test="role==5">内勤</s:elseif>
				<s:else>导游领队</s:else></td>
			<td><s:a action="guideAction" method="queryGuide" namespace="/officer" cssClass="a-button">
					<s:param name="guideId" value="userId"></s:param>
     				导游领队信息
    			</s:a>
			</td>
			<td><input type="button" class="resetPsw btn" value="重置密码" alt="<s:property value='userId'/>">
			</td>
		</tr>
	</s:iterator>
</table>
